package com.tanjie.blackbean.system.admin.model.rel;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * 角色和菜单关联表
 *
 * @author tanjie
 * @since 2022-04-21
 */
@Getter
@Setter
@ToString
@TableName("sys_role_menu")
@Schema(name = "RoleMenuPO", description = "角色和菜单关联表")
public class RoleMenuPO implements Serializable {

    private static final long serialVersionUID = 1L;

    public RoleMenuPO() {
    }

    public RoleMenuPO(String roleId, String menuId) {
        this.roleId = roleId;
        this.menuId = menuId;
    }

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @Schema(description = "角色ID")
    @TableField("role_id")
    private String roleId;

    @Schema(description = "菜单ID")
    @TableField("menu_id")
    private String menuId;

}
